package com.lavender.transaction.service.impl;

import com.lavender.transaction.entity.Account;
import com.lavender.transaction.mapper.AccountMapper;
import com.lavender.transaction.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author zhu.chen
 * @version 1.0
 * @date 2020/12/1
 */
@Service
public class AccountServiceImpl implements AccountService {

    @Autowired
    private AccountMapper accountMapper;

    @Override
    public Account selectByUserId(Account account) {
        return accountMapper.selectByUserId(account);
    }

    @Override
    public int updateByUserId(Account account) {
        return accountMapper.updateByUserId(account);
    }

    @Override
    public int deleteByUserId(Account account) {
        return accountMapper.deleteByUserId(account);
    }

    @Override
    public int deleteAll() {
        return accountMapper.deleteAll();
    }

    @Override
    public int insert(Account account) {
        return accountMapper.insert(account);
    }
}
